package lynch.base 
{
	import flash.display.Sprite;
	import lynch.manager.UIManager;
	
	/**
	 * 所有模块类父类
	 * 
	 */
	public class ModuleBase extends Sprite 
	{
		/**
		 * 调用openModule时传入的第二个参数
		 * @see lynch.manager.UIManager#openModule()
		 */
		public var data:*;
		
		/**
		 * 与哪些模块可以兼容运行
		 */
		public var compatibleModule:Vector.<String>;
		 
		public var moduleWidth:int = -1;
		public var moduleHeight:int = -1;
		
		public function ModuleBase() 
		{
			super();
			compatibleModule = new Vector.<String>(0, true);
		}
		
		/**
		 * 开启模块
		 */
		public function open():void
		{
			trace("this is on stage");
		}
		
		/**
		 * 关闭模块
		 */
		public function close():void
		{
			UIManager.getInstance.arcane::closeFromModule(this);
			trace("this is out of stage");
		}
	}

}